package com.zxbit.flash.bean;

import android.support.annotation.NonNull;

import java.io.Serializable;

public class CalculateData implements Serializable, Comparable<CalculateData> {
    private static final long serialVersionUID = 2879138942328673246L;

    /**
     * "pInterest": "0.73%",//利率
     * "pAccountFee": "2.0%",//管理利率
     * "pCreditserviceFee": "1.6%",//征信利率
     * "pId": "1",
     * "neteceipts": "348",//实收
     * "totalAccountFee": "70",//总管理费
     * "totalInterest": "25",//总利息
     * "expiryReturned": "500",//到期应还
     * "pTerm": "7",//权限
     * "totalCreditserviceFee": "56"//征信费用
     */

    private String pInterest;
    private String pAccountFee;
    private String pCreditserviceFee;
    private String pId;
    private String neteceipts;
    private String totalAccountFee;
    private String totalInterest;
    private String expiryReturned;
    private String pTerm;
    private String totalCreditserviceFee;

    public String getPInterest() {
        return pInterest;
    }

    public void setPInterest(String pInterest) {
        this.pInterest = pInterest;
    }

    public String getPAccountFee() {
        return pAccountFee;
    }

    public void setPAccountFee(String pAccountFee) {
        this.pAccountFee = pAccountFee;
    }

    public String getPCreditserviceFee() {
        return pCreditserviceFee;
    }

    public void setPCreditserviceFee(String pCreditserviceFee) {
        this.pCreditserviceFee = pCreditserviceFee;
    }

    public String getPId() {
        return pId;
    }

    public void setPId(String pId) {
        this.pId = pId;
    }

    public String getNeteceipts() {
        return neteceipts;
    }

    public void setNeteceipts(String neteceipts) {
        this.neteceipts = neteceipts;
    }

    public String getTotalAccountFee() {
        return totalAccountFee;
    }

    public void setTotalAccountFee(String totalAccountFee) {
        this.totalAccountFee = totalAccountFee;
    }

    public String getTotalInterest() {
        return totalInterest;
    }

    public void setTotalInterest(String totalInterest) {
        this.totalInterest = totalInterest;
    }

    public String getExpiryReturned() {
        return expiryReturned;
    }

    public void setExpiryReturned(String expiryReturned) {
        this.expiryReturned = expiryReturned;
    }

    public String getPTerm() {
        return pTerm;
    }

    public void setPTerm(String pTerm) {
        this.pTerm = pTerm;
    }

    public String getTotalCreditserviceFee() {
        return totalCreditserviceFee;
    }

    public void setTotalCreditserviceFee(String totalCreditserviceFee) {
        this.totalCreditserviceFee = totalCreditserviceFee;
    }

    @Override
    public int compareTo(@NonNull CalculateData calculateData) {
        try {
            return Integer.valueOf(this.getPTerm()) - Integer.valueOf(calculateData.getPTerm());
        } catch (Exception e) {
            e.printStackTrace();
            return 1;
        }
    }
}
